Abstract: Distance matrices are used for measuring the distance between two matrices. Using Distance matrices we can generate a Latin square which is also called as Sudoku code. Latin squares have a variety of different practical applications, for example they can be used to code messages, design tournaments or generate magic squares. The prime objective is to investigate the baseline multistage interconnection network and to measures the distance for their applicability to generate a Latin square. It is to identify, how a distance measure can be chosen, either offline or online again which distance measure take more time to compute. In detail, to show that the selection of distance measure can be decided by its algorithm complexity and time required to compute.

Keywords: Efficiency, Time to execute, Cost, Latin square, Permutation.